package $2024_3_18.Demo1;

public class SmallCar extends Car {
    String type;

    public SmallCar(String type) {

        this.type = type;
    }

    @Override
    public void drivingMethod(){
        System.out.println("小车正在行驶");
        super.drivingMethod();
    }


    public void trumpet(){
        System.out.println(this.type + "按喇叭");
    }

}
